
#include "mapIntersection.hpp"
#include "../config/config.hpp"

MapIntersection::MapIntersection(Node *n)
{
	this->node = n;
	this->setId(this->node->getId());
	this->setMapElementType(INTERSECTION);
	this->setPositionX(this->node->getPositionX());
	this->setPositionY(this->node->getPositionY());
	if(this->node->getBelongToMP())
		this->setImageSource(Config::getInstance()->get("block_blue_source"));
	else
		this->setImageSource(Config::getInstance()->get("inteserction_image_source"));

	this->setImageWidth(10);
	this->setImageHeight(10);

}

MapIntersection::MapIntersection(std::string id)
{
	this->setId(id);
	this->setMapElementType(INTERSECTION);
}

bool MapIntersection::belongToMP()
{
	return this->node->getBelongToMP();
}